
package net.swa.dewei.beans.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 区域信息实体类
 * 国家，省，市
 * 此信息现在只做查询不做维护（手动导入）
 * @author Administrator
 * 
 */
@Entity
@Table(name = "t_District")
public class District implements Serializable
{
    private static final long serialVersionUID = -9201118331824805328L;

    //主键
    private String id;

    /**父节点主键*/
    private String pid;

    /**区域名称**/
    private String name;
    
    /**父节点*/
    private String pname;

    /***层次，1省（直辖市），2市，3县区**/
    private int level;

    /**排序**/
    private int sort;

    @Id
    @Column(name = "id", unique = true, nullable = false)
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "assigned")
    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getPid()
    {
        return pid;
    }

    public void setPid(String pid)
    {
        this.pid = pid;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public int getSort()
    {
        return sort;
    }

    public void setSort(int sort)
    {
        this.sort = sort;
    }

    public int getLevel()
    {
        return level;
    }

    public void setLevel(int level)
    {
        this.level = level;
    }

    public String getPname()
    {
        return pname;
    }

    public void setPname(String pname)
    {
        this.pname = pname;
    }

}
